package com.zxw.文件.PDF.util;

import com.itextpdf.text.BaseColor;

import java.io.Serializable;

/**
 * @projectName: ruoyi
 * @package: com.ruoyi.common.utils.pdf
 * @className: TableCellData
 * @author: zhangxuewei
 * @description: 表格内容及其样式
 * @date: 2023/9/20 15:26
 * @version: 1.0
 */
public class TableCell implements Serializable {

    private static final long serialVersionUID = -6702328550534936773L;

    /**
     * 写入的文本
     */
    private String cellDataInfo = "";

    /**
     * 字体大小
     */
    private Float fontSize;

    /**
     * 字体颜色
     */
    private BaseColor fontColor;

    /**
     * 字体背景颜色
     */
    private BaseColor fontBackgroundColor;

    /**
     * 单元格背景颜色
     */
    private BaseColor cellBackgroundColor;


    /**
     * 单元格中文本的对其方式
     */
    private Integer cellAlign;


    /**
     * 字体是否加粗
     */
    private boolean bold = false;


    public BaseColor getFontBackgroundColor() {
        return fontBackgroundColor;
    }

    public TableCell setFontBackgroundColor(BaseColor fontBackgroundColor) {
        this.fontBackgroundColor = fontBackgroundColor;
        return this;
    }

    public Integer getCellAlign() {
        return cellAlign;
    }

    public TableCell setCellAlign(Integer cellAlign) {
        this.cellAlign = cellAlign;
        return this;
    }

    public String getCellDataInfo() {
        return cellDataInfo;
    }

    public TableCell setCellDataInfo(String cellDataInfo) {
        this.cellDataInfo = cellDataInfo;
        return this;
    }

    public Float getFontSize() {
        return fontSize;
    }

    public TableCell setFontSize(Float fontSize) {
        this.fontSize = fontSize;
        return this;
    }

    public BaseColor getFontColor() {
        return fontColor;
    }

    public TableCell setFontColor(BaseColor fontColor) {
        this.fontColor = fontColor;
        return this;
    }

    public BaseColor getCellBackgroundColor() {
        return cellBackgroundColor;
    }

    public TableCell setCellBackgroundColor(BaseColor cellBackgroundColor) {
        this.cellBackgroundColor = cellBackgroundColor;
        return this;
    }

    public boolean isBold() {
        return bold;
    }

    public TableCell setBold(boolean bold) {
        this.bold = bold;
        return this;
    }

    public TableCell(String info, Float fontSize, BaseColor fontColor) {
        this.cellDataInfo = info;
        this.fontSize = fontSize;
        this.fontColor = fontColor;
    }

    public TableCell(String info, BaseColor fontColor) {
        this.cellDataInfo = info;
        this.fontColor = fontColor;
    }

    public TableCell(String info) {
        this.cellDataInfo = info;
    }

    public TableCell() {
    }
}
